#pragma once
#include"HushTable.h"

namespace lth
{
	template<class k, class Hush = HushFunc<k>>
	class unordered_set
	{
	public:
		struct SetKeyOfT
		{
			const k& operator()(const k& key)
			{
				return key;
			}
		};
	public:
		typedef typename HushTable<k, k, SetKeyOfT, Hush>::const_iterator iterator;
		typedef typename HushTable<k, k, SetKeyOfT, Hush>::const_iterator const_iterator;
		
		iterator begin()
		{
			return _ht.begin();
		}

		iterator end()
		{
			return _ht.end();
		}

		const_iterator begin() const
		{
			return _ht.begin();
		}

		const_iterator end() const
		{
			return _ht.end();
		}

		pair<iterator, bool> insert(const k& key)
		{
			return _ht.Insert(key);
		}

	private:
		HushTable<k, k, SetKeyOfT> _ht;
	};
}